﻿CREATE TABLE [dbo].[SIWaitInvestigatePaper] (
    [Id]           INT           IDENTITY (1, 1) NOT NULL,
    [Status]       INT           DEFAULT ((0)) NOT NULL,
    [PatientId]    NVARCHAR (50) NULL,
    [Name]         NVARCHAR (50) NULL,
    [CardNo]       NVARCHAR (50) NULL,
    [CardType]     INT           NULL,
    [ClinicNo]     NVARCHAR (50) NULL,
    [Type]         INT           NULL,
    [CreateTime]   DATETIME      NULL,
    [SubmitTime]   DATETIME      NULL,
    [SubmitCount]  INT           DEFAULT ((0)) NULL,
    [SubmitOpenId] NVARCHAR (50) NULL,
    [NeedSendTime] DATETIME      NULL,
    [IsSended]     INT           CONSTRAINT [DF_SIWaitInvestigatePaper_IsSended] DEFAULT ((0)) NULL,
    [SendTime]     DATETIME      NULL,
    PRIMARY KEY CLUSTERED ([Id] ASC)
);


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'等待评价的诊疗记录', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'SIWaitInvestigatePaper';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'状态：0x1-完成，0x2-删除，0x4-锁定', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'SIWaitInvestigatePaper', @level2type = N'COLUMN', @level2name = N'Status';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'病人ID', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'SIWaitInvestigatePaper', @level2type = N'COLUMN', @level2name = N'PatientId';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'病人姓名', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'SIWaitInvestigatePaper', @level2type = N'COLUMN', @level2name = N'Name';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'就诊卡号', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'SIWaitInvestigatePaper', @level2type = N'COLUMN', @level2name = N'CardNo';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'就诊卡类型：0诊疗卡 1健康卡 2市民卡', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'SIWaitInvestigatePaper', @level2type = N'COLUMN', @level2name = N'CardType';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'诊断号', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'SIWaitInvestigatePaper', @level2type = N'COLUMN', @level2name = N'ClinicNo';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'类型: 0-挂号', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'SIWaitInvestigatePaper', @level2type = N'COLUMN', @level2name = N'Type';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'生成时间', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'SIWaitInvestigatePaper', @level2type = N'COLUMN', @level2name = N'CreateTime';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'提交时间', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'SIWaitInvestigatePaper', @level2type = N'COLUMN', @level2name = N'SubmitTime';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'提交次数', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'SIWaitInvestigatePaper', @level2type = N'COLUMN', @level2name = N'SubmitCount';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'提交人的微信用户OpenId', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'SIWaitInvestigatePaper', @level2type = N'COLUMN', @level2name = N'SubmitOpenId';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'需要发送的时间', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'SIWaitInvestigatePaper', @level2type = N'COLUMN', @level2name = N'NeedSendTime';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'是否已发送', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'SIWaitInvestigatePaper', @level2type = N'COLUMN', @level2name = N'IsSended';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'发送的时间', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'SIWaitInvestigatePaper', @level2type = N'COLUMN', @level2name = N'SendTime';

